/**
 * Copyright (C), 2015-2018, XXX有限公司
 * FileName: Role
 * Author:   zhouheng
 * Date:     2018/6/18 18:29
 * Description: 角色类
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.hengby.hengcrud.modular.sys.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import groovy.transform.Field;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * 〈一句话功能简述〉<br> 
 * 〈角色类〉
 *
 * @author zhouheng
 * @create 2018/6/18
 * @since 1.0.0
 */
@TableName(value = "sys_role")
@Getter
@Setter
public class Role extends Model<Role> {

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    // 主键id
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    // 序号
    private Integer num;

    // 父角色id
    private Integer pid;

    // 角色名称
    @TableField(value = "name")
    private String roleName;

    // 部门id
    private Integer deptId;

    // 提示信息
    private String tips;

    // 保留字段
    private Integer version;


    @Override
    public String toString() {
        return "Role{" +
                "id=" + id +
                ", num=" + num +
                ", pid=" + pid +
                ", roleName='" + roleName + '\'' +
                ", deptId=" + deptId +
                ", tips='" + tips + '\'' +
                ", version=" + version +
                '}';
    }
}